home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Finder Dungeon / source code / MoreFiles 1.4.6 / MoreFilesLib.make < prev   
Encoding:
Text File  |  1997-06-28  |  3.2 KB  |  99 lines  |  [TEXT/MPS ]

  1. #------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    Program:    MoreFilesLib
  6. #    File:        MoreFilesLib.make
  7. #
  8. #    Copyright © 1996-1997 Apple Computer, Inc.
  9. #    All rights reserved.
  10. #
  11. #------------------------------------------------------------------------------
  12.  
  13. #    The three possible targets for this makefile
  14. #
  15. #    The default name is LibName and builds the 68K library
  16. #    named MoreFilesLib.o
  17. #
  18. #    PowerPC library is named MoreFilesLib.PPC and is built with:
  19. #        make -f MoreFilesLib.make MoreFilesLib.PPC
  20. #
  21. #    The "Fat" version isn't actually fat, it just builds both 68K and 
  22. #        PowerPC versions.  Build it with:
  23. #        make -f MoreFilesLib.make MoreFilesLib.FAT
  24. #
  25. LibName            =    'MoreFilesLib.o'
  26. LibNamePPC        =    'MoreFilesLib.PPC'
  27. LibNameFAT        =    'MoreFilesLib.FAT'
  28.  
  29. MoreFiles.hdrs    =   ":C Headers:"
  30. projsrc            =    ":Sources:"
  31. obj                =     :Objects:
  32. objppc            =     :ObjectsPPC:
  33. libs            =     :Libs:
  34.  
  35. DebugTarget        =    #(debug)
  36. MacsBugSyms        =    -mbg off                # turn this on to debug 68K code with MacsBug or other low-level debuggers
  37.  
  38. #    SymOptions and OptOptions are mutually exclusive.  Enable as appropriate
  39. SymOptions        =    -sym off                # turn this on to debug with SADE/R2Db
  40. COptOptions        =    -opt on                    # turn this off to build debug 68K code
  41. MrCOptOptions    =    -opt speed                # turn this off to build debug PowerPC code
  42.  
  43. IncludesFolders    =    -i {MoreFiles.hdrs}
  44. COptions        =    {IncludesFolders} {SymOptions} {COptOptions} {MacsBugSyms} -r
  45. MrCOptions        =    {IncludesFolders} {SymOptions} {MrCOptOptions}
  46. LibOptions        =    {SymOptions}
  47. LibOptionsPPC    =    -xm l {SymOptions}
  48.  
  49. #------------------------------------------------------------------------------
  50. # These are modified default build rules.  These allow us to build using both
  51. # SC (68K) and MrC (PowerPC) from the same set of sources
  52. #------------------------------------------------------------------------------
  53. {obj}            ƒ    {projsrc}
  54.  
  55. .c.o            ƒ    .c
  56.     Echo "# compiling "{Default}.c" using "{C}
  57.     {C} {COptions} {CAltOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.o
  58.  
  59. {objppc}        ƒ    {projsrc}
  60.  
  61. .c.x            ƒ    .c
  62.     Echo "# compiling "{Default}.c" using MrC"
  63.     MrC {MrCOptions} {DepDir}{Default}.c -o {TargDir}{Default}.c.x
  64.  
  65. #------------------------------------------------------------------------------
  66. # These are the objects that we want to include in the library.
  67. #------------------------------------------------------------------------------
  68. LibObjects        =    ∂
  69.                     {obj}DirectoryCopy.c.o ∂
  70.                     {obj}FileCopy.c.o ∂
  71.                     {obj}FSpCompat.c.o ∂
  72.                     {obj}FullPath.c.o ∂
  73.                     {obj}IterateDirectory.c.o ∂
  74.                     {obj}MoreDesktopMgr.c.o ∂
  75.                     {obj}MoreFiles.c.o ∂
  76.                     {obj}MoreFilesExtras.c.o ∂
  77.                     {obj}Search.c.o
  78.  
  79. LibObjectsPPC    =    ∂
  80.                     {objppc}DirectoryCopy.c.x ∂
  81.                     {objppc}FileCopy.c.x ∂
  82.                     {objppc}FSpCompat.c.x ∂
  83.                     {objppc}FullPath.c.x ∂
  84.                     {objppc}IterateDirectory.c.x ∂
  85.                     {objppc}MoreDesktopMgr.c.x ∂
  86.                     {objppc}MoreFiles.c.x ∂
  87.                     {objppc}MoreFilesExtras.c.x ∂
  88.                     {objppc}Search.c.x
  89.  
  90. {LibNameFAT}        ƒ {LibName} {LibNamePPC}
  91.  
  92. {LibName}            ƒƒ {LibObjects}
  93.     Echo "# building 68k library"
  94.     Lib {LibObjects} {LibOptions} -o "{libs}{Targ}{DebugTarget}"
  95.  
  96. {LibNamePPC}        ƒƒ {LibObjectsPPC}
  97.     Echo "# building PowerPC library"
  98.     PPCLink    {LibObjectsPPC} {LibOptionsPPC}    -o "{libs}{Targ}{DebugTarget}"
  99.